import { registerEditorProvider } from '@ibiz-template/runtime';
import { App } from 'vue';
import { CheckinTimePicker } from './checkin-time-picker';
import { CheckinTimePickerProvider } from './checkin-time-picker.provider';

export default {
  install(app: App) {
    // 全局注册编辑器插件组件
    app.component(CheckinTimePicker.name!, CheckinTimePicker);
    // 全局注册编辑器插件适配器，EDITOR_CUSTOMSTYLE是插件类型，checkin-time-picker█是插件标识
    registerEditorProvider(
      'EDITOR_CUSTOMSTYLE_TIME_PICKER',
      () => new CheckinTimePickerProvider(),
    );
  },
};
